#!/usr/bin/env bash

sys=$(uname -s | tr '[:upper:]' '[:lower:]')
echo "当前系统 $sys"

case $sys in 
    *"cygwin"*) echo "cygwin" ;;   #要使用通配符就不要加引号
    *linux*)  echo "linux" ;;
    *) echo "none";;
esac

if [[ $sys == *cygwin* ]] ; then 
    echo "sys->sygwin"
else 
    echo "unknow"
fi 

if [[ $sys == *"cygwin"* ]] ; then 
    echo "sys->sygwin"
else 
    echo "unknow"
fi 
